package com.bst.base.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bst.base.mapper.BaseDownloadLogMapper;
import com.bst.base.domain.BaseDownloadLog;
import com.bst.base.service.IBaseDownloadLogService;
import com.bst.common.core.text.Convert;

/**
 * 文件下载日志Service业务层处理
 * 
 * @author laoliu
 * @date 2025-02-26
 */
@Service
public class BaseDownloadLogServiceImpl implements IBaseDownloadLogService 
{
    @Autowired
    private BaseDownloadLogMapper baseDownloadLogMapper;

    /**
     * 查询文件下载日志
     * 
     * @param idDownloadLog 文件下载日志主键
     * @return 文件下载日志
     */
    @Override
    public BaseDownloadLog selectBaseDownloadLogByIdDownloadLog(Long idDownloadLog)
    {
        return baseDownloadLogMapper.selectBaseDownloadLogByIdDownloadLog(idDownloadLog);
    }

    /**
     * 查询文件下载日志列表
     * 
     * @param baseDownloadLog 文件下载日志
     * @return 文件下载日志
     */
    @Override
    public List<BaseDownloadLog> selectBaseDownloadLogList(BaseDownloadLog baseDownloadLog)
    {
        return baseDownloadLogMapper.selectBaseDownloadLogList(baseDownloadLog);
    }

    /**
     * 新增文件下载日志
     * 
     * @param baseDownloadLog 文件下载日志
     * @return 结果
     */
    @Override
    public int insertBaseDownloadLog(BaseDownloadLog baseDownloadLog)
    {
        return baseDownloadLogMapper.insertBaseDownloadLog(baseDownloadLog);
    }

    /**
     * 修改文件下载日志
     * 
     * @param baseDownloadLog 文件下载日志
     * @return 结果
     */
    @Override
    public int updateBaseDownloadLog(BaseDownloadLog baseDownloadLog)
    {
        return baseDownloadLogMapper.updateBaseDownloadLog(baseDownloadLog);
    }

    /**
     * 批量删除文件下载日志
     * 
     * @param idDownloadLogs 需要删除的文件下载日志主键
     * @return 结果
     */
    @Override
    public int deleteBaseDownloadLogByIdDownloadLogs(String idDownloadLogs)
    {
        return baseDownloadLogMapper.deleteBaseDownloadLogByIdDownloadLogs(Convert.toStrArray(idDownloadLogs));
    }

    /**
     * 删除文件下载日志信息
     * 
     * @param idDownloadLog 文件下载日志主键
     * @return 结果
     */
    @Override
    public int deleteBaseDownloadLogByIdDownloadLog(Long idDownloadLog)
    {
        return baseDownloadLogMapper.deleteBaseDownloadLogByIdDownloadLog(idDownloadLog);
    }
}
